using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using Noris.Schedule.Support;

namespace Noris.Schedule.UI.Forms
{
	public partial class ConfigForm : Form
	{
		public ConfigForm()
		{
			InitializeComponent();
		}

		private void ConfigForm_Load(object sender, EventArgs e)
		{
			_DbConnect.DbCurrentConnectString = Steward.AppConfig.ConnectString;
			_SaveCnt.SaveEnabled = false;
		}

		private void _DbConnect_DbConnectStringChanged(object sender, EventArgs e)
		{
			_SaveCnt.SaveEnabled = true;
		}


		private void _SaveCnt_SaveData(object sender, EventArgs e)
		{
			Steward.AppConfig.ConnectString = _DbConnect.DbCurrentConnectString;
			Steward.AppConfig.CurrentProfile.Save();

			_SaveCnt.SaveEnabled = false;
		}

	}
}